#include "myvector.h"
using namespace wzh;
//using namespace std;
int main()
{
	vector<int> v1(5, 8);
	/*vector<int> v2(7, 6);
	for (int i = 0; i < v1.size(); i++)
	{
		cout << v1[i] << " ";
	}
	cout << endl;

	for (int i = 0; i < v2.size(); i++)
	{
		cout << v2[i] << " ";
	}
	cout << endl;
	v2.swap(v1);
	for (int i = 0; i < v1.size(); i++)
	{
		cout << v1[i] << " ";
	}
	cout << endl;
	for (int i = 0; i < v2.size(); i++)
	{
		cout << v2[i] << " ";
	}
	cout << endl;*/

	v1.insert(v1.begin() + 4, 10);
	for (int i = 0; i < v1.size(); i++)
	{
		cout << v1[i] << " ";
	}
	cout << endl;

	v1.erase(v1.begin() + 4);
	for (int i = 0; i < v1.size(); i++)
	{
		cout << v1[i] << " ";
	}
	cout << endl;
	/*vector<int> v1;
	vector<int> v2(10, 5);
	string arr = "abcdef";
	vector<char> v3(arr.begin(), arr.end());
	vector<int> v4(v2);
	vector<int> v5;
	v5 = v2;
	
	cout << v2.size() << " " << v2.capacity() << endl;
	v2.reserve(20);	
	cout << v2.size() << " " << v2.capacity() << endl;

	v2.resize(15);
	cout << v2.size() << " " << v2.capacity() << endl;*/

	/*vector<int> v(5, 3);
	for (int i = 0; i < v.size(); i++)
	{
		cout << v[i] << " ";
	}
	cout << endl;

	v.push_back(5);
	v.push_back(5);
	v.push_back(5);
	v.push_back(5);
	v.push_back(5);

	for (int i = 0; i < v.size(); i++)
	{
		cout << v[i] << " ";
	}
	cout << endl;

	v.pop_back();
	v.pop_back();
	v.pop_back();
	v.pop_back();

	for (int i = 0; i < v.size(); i++)
	{
		cout << v[i] << " ";
	}
	cout << endl;

	vector<int> vv(5, 8);
	for (int i = 0; i < vv.size(); i++)
	{
		cout << vv[i] << " ";
	}
	cout << endl;

	vv.swap(v);
	for (int i = 0; i < vv.size(); i++)
	{
		cout << vv[i] << " ";
	}
	cout << endl;

	for (int i = 0; i < v.size(); i++)
	{
		cout << v[i] << " ";
	}
	cout << endl;*/
}